package com.huaxin.hxmoduleworkorder.dto.request;

import com.huaxin.hxmoduleworkorder.common.annotation.validation.ValidMaintenanceOrderOperatorRole;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Builder;
import lombok.Data;

/**
 * 新增维修工单电工分配记录请求 DTO
 * <p>
 * 对应实体类：MaintenanceOrderElectricianTask
 * 用于记录维修工单中电工的分配信息，支持多电工协作场景。
 * 所有字段命名与实体类完全一致，确保映射准确。
 * 使用 jakarta.validation 进行参数校验。
 * </p>
 *
 * @author [你的名字或团队]
 * @since 2025-09-02
 */
@Data
@Builder
public class MaintenanceOrderElectricianTaskCreateReqDTO {
    @Schema(description = "维修工单ID，关联的工单", example = "mnt_order_001")
    @NotBlank(message = "维修工单ID不能为空")
    private String maintenanceOrderId;

    @Schema(description = "电工ID", example = "e1001")
    @NotBlank(message = "电工ID不能为空")
    private String electricianId;

    @Schema(description = "负责内容描述", example = "负责线路检测与修复")
    @Size(max = 500, message = "负责内容描述长度不能超过500个字符")
    private String responsibility;
    
    @Schema(description = "操作人角色：customer（客户）/admin（管理员）/electrician（电工）", example = "admin")
    @ValidMaintenanceOrderOperatorRole
    private String operatorRole;

    @Schema(description = "操作人地址经度", example = "120.123456")
    private String operatorLongitude;

    @Schema(description = "操作人地址纬度", example = "30.123456")
    private String operatorLatitude;

    @Schema(description = "备注备注，如审核意见、处理说明等", example = "116.397128")
    private String remarks;
}